import request from '@/utils/request'

// 查询粮食入库列表
export function listEntry(query) {
  return request({
    url: '/food/entry/list',
    method: 'get',
    params: query
  })
}

export function getWord(data) {
  return request({
    url: '/voice/getWord',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 查询粮食入库详细
export function getEntry(id) {
  return request({
    url: '/food/entry/' + id,
    method: 'get'
  })
}

// 新增粮食入库
export function addEntry(data) {
  return request({
    url: '/food/entry',
    method: 'post',
    data: data
  })
}

// 修改粮食入库
export function updateEntry(data) {
  return request({
    url: '/food/entry',
    method: 'put',
    data: data
  })
}

// 删除粮食入库
export function delEntry(id) {
  return request({
    url: '/food/entry/' + id,
    method: 'delete'
  })
}
